Quiz#1 is scheduled for the 25th of September (Up to today's and including today's material)
"Dont complain just work harder"


- Exception handling: 

Example#1: Product codes

Read a product code: the first 4 digits => area info and the 5th character => B

area code >= 2000 and city code = 'B' => banned code

Objective: ask the user to enter product codes and count the # valid/banned codes

We can handle exceptions using try-catch statement

- Exception propagation: 
Example#2: Exception propagation

getMessage() --> gets you the error message
printStackTrace ---> Stack trace: stack that contains all the methods that had to be called 
to get to the one producing the error

- Two types of exceptions: checked exceptions + unchecked exceptions
All the exception built-in classes are derived from a superclass: Exception, which is derived
from Throwable

The only unchecked exceptions in Java are the exception classes derived from RuntimeException 
=> require no try-catch and no throws clause in the header of the method

Checked exceptions must either be handled (try-catch) or included in a throws clause that you 
add to the header of the problematic method

- Creating my own Exception class
Example#3: Creating Exception

80% of the required skills ==> 20% of the info

1^365 = 1
1.01^365 = approx. 37 
 









 